/*
 * @LastEditTime: 2023-11-16 17:49:00
 * @FilePath: \bdcar-net\src\utils\map\index.js
 */

import 'leaflet/dist/leaflet.css'
// 引入Leaflet对象 挂载到Vue上，便于全局使用，也可以单独页面中单独引用
import * as L from 'leaflet'

//引入绘图插件
// import 'leaflet-draw'
// import 'leaflet-draw/dist/leaflet.draw.css'
// import '@/utils/map/leaflet-zh-cn'
// 插件里面的代码有问题，没有定义矩形的type，会引起报错，所以拿出来修改了
import "@/utils/map/leaflet.draw";
import "@/assets/styles/other/leaflet.draw-src.css";
import '@/utils/map/leaflet-zh-cn'

/* leaflet icon */
let prototype = L.Icon.Default.prototype
delete prototype._getIconUrl
L.Icon.Default.mergeOptions({
    iconRetinaUrl: new URL('leaflet/dist/images/marker-icon-2x.png', import.meta.url).href,
    iconUrl: new URL('leaflet/dist/images/marker-icon.png', import.meta.url).href,
    shadowUrl: new URL('leaflet/dist/images/marker-shadow.png', import.meta.url).href,
})
